﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace scrSaver
{
    public class MyPictureBox : System.Windows.Forms.PictureBox
    {
        public MyPictureBox(int xCoord, int yCoord, int width, int height)
        {
            this.Image = global::scrSaver.Properties.Resources.left_speech_bubble;
            this.MinimumSize = new System.Drawing.Size(width, height);
            this.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
            this.SetBounds(xCoord, yCoord, width, height);
        }
    }

    public class MyCloseButton : System.Windows.Forms.PictureBox
    {
        public MyCloseButton(int widthScreen)
        {
            this.Image = global::scrSaver.Properties.Resources.CloseButton;
            this.Location = new System.Drawing.Point(widthScreen - 60, 20);
            this.Name = "closeButton";
            this.Size = new System.Drawing.Size(30, 30);
            this.TabIndex = 0;
            this.TabStop = false;
        }
    }

    public class MyTitle : System.Windows.Forms.Label
    {
        public MyTitle(string mytext, int width)
        {
            this.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
            this.AutoSize = true;
            this.BackColor = System.Drawing.Color.Transparent;
            this.Font = new System.Drawing.Font("Comic Sans MS", 20.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.ForeColor = System.Drawing.Color.White;
            this.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
            this.Name = "label1";
            this.TabIndex = 0;
            this.Text = mytext;
            System.Drawing.Size mySize = new System.Drawing.Size(640, 75);
            this.MinimumSize = mySize;
            this.MaximumSize = mySize;
            this.SetBounds(((width-640)/2), 0, 640, 75);
        }
    }

    public class MyLabel : System.Windows.Forms.Label
    {
        public MyLabel(string mytext, int xCoord, int yCoord, int width, int height)
        {
            int myLabelHeight = (int)(0.5 * height);
            int myLabelWidth = (int)(0.83 * width);
            int myLabelXCoord = xCoord + (int)(0.085 * width);
            int myLabelYCoord = yCoord + (int)(0.25 * height);
            this.AutoSize = true;
            this.BackColor = System.Drawing.Color.White;
            this.Font = new System.Drawing.Font("Comic Sans MS", 14F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.MaximumSize = new System.Drawing.Size(myLabelWidth, myLabelHeight);
            this.MinimumSize = new System.Drawing.Size(myLabelWidth, myLabelHeight);
            this.Text = mytext;
            this.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
            this.SetBounds(myLabelXCoord, myLabelYCoord, myLabelWidth, myLabelHeight);
        }
    }
}
